import request from '@/utils/http'

const getListApi = (params) => {
  return request({
    method: 'get',
    url: 'api/score/list',
    params,
  })
}
const deleteApi = (params) => {
  return request({
    method: 'delete',
    url: 'api/score',
    params,
  })
}

const addApi = (data) => {
  return request({
    method: 'post',
    url: 'api/score',
    data,
  })
}
const getDetailApi = (params) => {
  return request({
    method: 'get',
    url: 'api/score',
    params,
  })
}

const batchAddApi = (data) => {
  return request({
    method: 'post',
    url: 'api/score/batchAdd',
    data,
  })
}

const getTeacherListApi = (params) => {
  return request({
    method: 'get',
    url: 'api/score/teacherList',
    params,
  })
}
const getCourseListApi = () => {
  return request({
    method: 'get',
    url: 'api/score/courseList',
  })
}
const getStudentListApi = () => {
  return request({
    method: 'get',
    url: 'api/score/studentList',
  })
}
const exportApi = () => {
  return request({
    method: 'get',
    responseType: 'blob',
    url: 'api/score/export',
  })
}

export { getListApi, deleteApi, addApi, getDetailApi, batchAddApi, getTeacherListApi, getCourseListApi, getStudentListApi, exportApi }
